<?php
namespace app\platform\controller;
use app\BaseController;
use app\common\logic\TokenLogic;


class ShopManageAuth extends BaseController{
    public function authLogin()
    {
        $token = $this->request->param('token');
        if(empty($token)){
            return $this->error('TOKEN登录无效');
        }
        $res = TokenLogic::getShopData($token);
        if($res === false){
            return $this->error('TOKEN登录无效#1');
        }
        if(empty($res['accountId'])){
            return $this->error('TOKEN登录无效#2');
        }
        if(empty($res['shopId'])){
            return $this->error('TOKEN登录无效#3');
        }
        return $this->success();
    }


}
